home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / Interfaces&Libraries / Interfaces / CIncludes / MacRuntime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-17  |  1.7 KB  |  74 lines  |  [TEXT/MPS ]

  1. /*
  2.  *    MacRuntime.h
  3.  *    C Interface to the Macintosh Programmer's Workshop Libraries
  4.  *
  5.  * © Copyright Apple Computer Inc. 1993-1995
  6.  * All rights reserved.
  7.  *
  8.  * Warning:  This interface is NOT a part of the ANSI C standard.
  9.  *             We do NOT claim to be POSIX compliant.  If you want
  10.  *             your code to be portable, don't use this interface.
  11.  */
  12.  
  13.  
  14. #ifndef __MACRUNTIME__
  15. #define __MACRUNTIME__    1
  16.  
  17.  
  18. #include <Types.h>
  19.  
  20. #if defined(__CFM68K__) || defined(__powerc)
  21. #include <CodeFragments.h>        /* For "CFragInitBlockPtr". */
  22. #endif /* __CFM68K__ || __powerc */
  23.  
  24. #if defined(__powerc)
  25. #include <Memory.h>                /* For "THz". */
  26. #endif /* __powerc */
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. /* Program Initialization and Termination */
  33.  
  34. int _RTInit(ProcPtr retPC, int *pArgC, char ***pArgV, char ***pEnvP, int forPascal);
  35. void _RTExit(int status);
  36.  
  37. /* Utility Routine */
  38.  
  39. pascal Boolean TrapAvailable (short TrapNumber);
  40.  
  41. #if defined(__CFM68K__) || defined(__powerc)
  42.  
  43. /* Default code fragment initialization and termination entry points.        */
  44. /* Needed for CFM applications or shared libraries containing C++ code.        */
  45.  
  46. extern OSErr    __init_app(CFragInitBlockPtr initBlockPtr);
  47. extern void        __term_app(void);
  48. extern OSErr    __init_lib(CFragInitBlockPtr initBlockPtr);
  49. extern void        __term_lib(void);
  50.  
  51. #endif /* __CFM68K__ || __powerc */
  52.  
  53. #if defined(__powerc)
  54. /* Types and functions for use in PowerMac CFM termination routines. */
  55.  
  56. struct CFragWorld {
  57.     THz heapZone;
  58.     long emulatorA5;
  59.     int unused;
  60. };
  61.  
  62. typedef struct CFragWorld CFragWorld, *CFragWorldPtr;
  63.  
  64. extern void __RestoreInitialCFragWorld(CFragWorldPtr oldCFragWorld);
  65. extern void __RevertCFragWorld(CFragWorldPtr oldCFragWorld);
  66.  
  67. #endif /* __powerc */
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72. #endif
  73.  
  74.